package ${packageName};
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import ${BASE_PACKAGE}.model.po.${tableInfo.className?cap_first}Entity;
import ${BASE_PACKAGE}.model.dto.${tableInfo.className?cap_first}DTO;
import ${BASE_PACKAGE}.model.param.${tableInfo.className?cap_first}Param;
import java.util.List;

/**
 * ${tableInfo.className?cap_first}数据访问层
 *
 * @author ${author}
 * @date ${.now?string("yyyy-MM-dd")}
 */
@Mapper
public interface ${tableInfo.className?cap_first}Mapper extends BaseMapper<${tableInfo.className?cap_first}Entity> {
    /**
     * 添加${tableInfo.className?cap_first}
     *
     * @param entity ${tableInfo.className?cap_first}实体
     * @return 影响的行数
     */
    int insert(${tableInfo.className?cap_first}Entity entity);

    /**
     * 更新${tableInfo.className?cap_first}
     *
     * @param entity ${tableInfo.className?cap_first}实体
     * @return 影响的行数
     */
    int update(${tableInfo.className?cap_first}Entity entity);

    /**
     * 删除${tableInfo.className?cap_first}
     *
     * @param id ${tableInfo.className?cap_first}ID
     * @return 影响的行数
     */
    int delete(@Param("id") Long id);

    /**
     * 分页查询${tableInfo.className?cap_first}列表
     *
     * @param param 查询参数
     * @return ${tableInfo.className?cap_first}实体列表
     */
    IPage<${tableInfo.className?cap_first}DTO> page(${tableInfo.className?cap_first}Param param);

    /**
     * 查询${tableInfo.className?cap_first}列表
     *
     * @param param 查询参数
     * @return ${tableInfo.className?cap_first}DTO列表
     */
    List<${tableInfo.className?cap_first}DTO> list(${tableInfo.className?cap_first}Param param);

    /**
     * 检查字段是否存在
     *
     * @param dto
     * @return Integer
     */
    Integer checkRepeat(${tableInfo.className?cap_first}DTO dto);


}